package router

import (
	"content-sharing_0929/internal/service"
	"github.com/gin-gonic/gin"
)

func Router(r *gin.Engine) {
	api := r.Group("/api")
	{
		//用户
		user := api.Group("/user")
		{
			//注册
			user.POST("register", service.RegisterUser)
			//登陆
			user.POST("login", service.LoginUser)
		}
		//帖子
		post := api.Group("/post")
		{
			//发布
			post.POST("add", service.AddPost)
		}
		//文件
		file := api.Group("/file")
		{
			//文件上传
			file.POST("upload", service.UploadFile)
		}
		//审核
		review := api.Group("/review")
		{
			//审核
			review.POST("sharing", service.SharingReview)
		}
	}
}
